// iteration & array  functions
var array = [1,3,5,7,9,11,13,15,17,19,14];
dojo.every(array,function(item){return item < 20});//true
dojo.filter(array,function(item,index,arr){return item < 10});//1,3,5,7,9
dojo.forEach(array,function(item,index,arr){arr[index]=item - index});
dojo.indexOf(array,"17",O,false);
dojo.map(array,function(item, idx){return item * idx;});
dojo.some(array,function(item){return item < 5});//true

//style manger
dojo.addClass("classname");
dojo.removeClass("classname");
dojo.hasClass("className");
dojo.toggleClass('classname');
dojo.style("nodeId","color");
dojo.style("nodeId","color","#000000")
//event manger
dojo.addOnLoad(function(){});
dojo.addOnUnLoad(function(){});
	/**
	 * dojo.connect kind like aop
	 */
	var class1 = {sayHello:function(name){alert(name);}};
	function log(name){console.log(name)};
	dojo.connect(class1,"sayHello",null,log);
	class1.sayHello("OMG")
    /**
     * dojo.subscribe & dojo.publish
     */
	function callback(){alert(arguments.length);}
	var handler = dojo.subscribe("topic",null,callback);
	dojo.publish("topic",['args1','args2']);
	dojo.unsubscribe(handler);
	dojo.connectPublisher("topic",class,"sayHello");
	
//dom operation
dojo.body();
dojo.clone();
dojo.getObject();
dojo.setObject("com.ibm.ruanqi","good");
dojo.place('node2','node1','after/before/first/last');
dojo.setSelectable("nodeId",false);
//selector
dojo.byId("anyId");
dojo.query('.className','nodeId');
//check util
dojo.exists("class1.sayHello");//true
dojo.isArray();
dojo.isArrayLike();
dojo.isDescendant();
dojo.isFunction();
dojo.isObject();
dojo.isString();

//class operations
dojo.extend(currentClass,new ParentClass1(),new ParentClass2())

//animation
dojo.fadeOut({node:"nodeId",duration:2000,onEnd:function(){
	dojo.fadeIn({node:"nodeId",duration:2000}).play();
}}).play();

//util
dojo.cookie("cookieName","cookieName",{});
dojo.cookie("cookieName");
dojo.cookie("cookieName",null,{expires:-1});
dojo.cookie.useObject("cookieName",{a:"value"});
var a = dojo.cookie.useObject("cookieName").a;


dojo.coods("someId");

dojo.formToObject('formName');
dojo.formToQuery('formName');
dojo.formToJson('formName');
